<template>
  <div class="hello">
    <h1>{{ username }}</h1>
  </div>
</template>

<script>
import { getUser } from "@/common/api";
export default {
  name: "HelloWorld",
  data() {
    return {
      username: String
    };
  },
  created() {
    getUser(1)
      .then(data => {
        this.username = data.name + this.$store.state.FrontStore.todayDate;
      })
      .catch(err => {
        console.log(err);
      });
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
